<template>
	<view class="container">
		<view class="content top u-margin-20 u-padding-20">
			<u-image width="80rpx" height="80rpx" src="http://118.31.238.190/home/img_trade_detail.png"></u-image>
			<view class="u-margin-top-10">
				{{detailInfo.lsMerchantName}}
			</view>
			<view class=" theme u-margin-top-10 u-margin-bottom-10">
				￥ <text class="u-font-18 money">{{detailInfo.transAmount}}</text>
			</view>
			<view class="">
				{{detailInfo.transStatus=="SUCCESS"?"交易成功":detailInfo.transStatus=="INIT"?"初始化":detailInfo.transStatus=="FAILED"?"交易失败":detailInfo.transStatus=="REFUNDED"?"已退票":""}}
			</view>
		</view>
		<view class="content  u-margin-20 u-padding-20">
			<view class="flex justify-between">
				<view class="">
					订单号
				</view>
				<view class="">
					{{detailInfo.orderNo}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					商户编号
				</view>
				<view class="">
					{{detailInfo.merchantNo}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					交易手续费
				</view>
				<view class="">
					{{detailInfo.settleFee}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					支付类型
				</view>
				<view class="">
					{{detailInfo.payTypeCode=="POS"?"刷卡":detailInfo.payTypeCode=="MOBILE_PAY"?"移动支付":detailInfo.payTypeCode=="WX"?"微信":detailInfo.payTypeCode=="ZFB"?"支付宝":detailInfo.payTypeCode=="YL_CODE_LESS"?"银联二维码(<=1000)":detailInfo.payTypeCode=="YL_CODE_MORE"?"银联二维码(>=1000)":detailInfo.payTypeCode=="NFC"?"T1":""}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					是否结算
				</view>
				<view class="">
					{{detailInfo.settleStatus=="UNKNOW"?"结算中":detailInfo.settleStatus=="SUCCESS"?"已结算":detailInfo.settleStatus=="FAIL"?"结算失败":detailInfo.settleStatus=="REFUNDED"?"已退票":""}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					结算周期
				</view>
				<view class="">
					{{detailInfo.settleType=="0"?"T0":detailInfo.settleType=="1"?"T1":""}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					交易日期
				</view>
				<view class="">
					{{detailInfo.transTime}}
				</view>
			</view>
		</view>
		<view class="content  u-margin-20 u-padding-20">
			<view class="flex justify-between">
				<view class="">
					银行卡号
				</view>
				<view class="">
					{{detailInfo.bankCode}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					银行名称
				</view>
				<view class="">
					{{detailInfo.bankName}}
				</view>
			</view>
			<view class="flex justify-between u-m-t-20">
				<view class="">
					卡类型
				</view>
				<view class="">
					{{detailInfo.cardType=="0"?"其他":detailInfo.cardType=="1"?"贷记卡":detailInfo.cardType=="2"?"借记卡":""}}
				</view>
			</view>


		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderNo: "",
				detailInfo: {}
			}
		},
		onLoad(options) {
			this.orderNo = options.orderNo;
			this.getDetail()
		},
		methods: {
			getDetail() {
				const _that = this;
				this.$zx.order_api.transOrderDetail(this.orderNo).then((data) => {

					console.log("data=" + JSON.stringify(data))

					_that.detailInfo = data;

				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.content {
		background-color: white;
		border-radius: 20rpx;


	}

	.top {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.money {
		font-weight: bold;
	}
</style>